/****************************************************************
 * I am the AC 130 vs Pirate game. I allow the user to control an 
 * AC130 gunship in the hunt for Modern day pirates. The player  
 * will be allowed to roam free across a section of ocean/coastline.  
 * In the water there will be four types of vessels: Merchant  
 * ships that the player must protect, Pirate ships that the player  
 * must identify and destroy, Fishing boats that look like Pirate  
 * ships that the player must not destroy, and Friendly Navy ships  
 * that can capture pirates for extra points. Time permitting there  
 * may also be ground targets to attack. 
 *
 * Key elements of this project will be the Player/AC130, the Ships,  
 * the ShipAI system, the collision grid, the debris controller, the  
 * Ground/Water, Clouds, and scoring system. This project will make  
 * use of an external text file to store useful game parameters,  
 * thus allowing us to play balance the game without recompiling  
 * the executable. 
 *****************************************************************
 * I am the Ship Controll class. I contain the array of all ships.
 * I have the funcitons, that spawn, update and maintain the ships 
 * int he game.
 *****************************************************************/


#include "Camera.h"
#include "Ship.h"
#include "BulletCtrl.h"
#include "CrashBin.h"
#include "GameData.h"
#include <allegro.h>

#ifndef __SHIP_CTRL_H__
#define __SHIP_CTRL_H__

#define MAXSHIP 128
#define MAXSHIPTYPE 32

class ShipCtrl {
public:
		// external refs
	GameData * gd;
	BulletCtrl * myBulletCtrl;
	CrashBin * myCrashBin;
		// main array
	Ship * myShip[MAXSHIP];

		//type info
	int maxType;	// top used element of the array
	BITMAP * btmBmp[MAXSHIPTYPE];
	BITMAP * topBmp[MAXSHIPTYPE];

public:
	ShipCtrl();
	~ShipCtrl();
		// pull in external data
	void Init(GameData * exgd, BulletCtrl * exBulletCtrl,
		CrashBin * exCrashBin);
	void Reset();
	void Spawn(Point * start, int type, int path);
	void Register();
	void Update();
	void UpdateShip(int index);
	void Draw(Camera * cam);

};

#endif